package com.jieyun.core.constant;

/**
 * 全局常量的定义
 * @author trekxu
 *
 */
public interface Constant {
	
	String TOP_USER = "trek";
	
	/**
	 * session之中存储用户的键
	 */
	String SESSION_USER = "sessionUser";
	
	String  DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	String DATE_FORMAT ="yyyy-MM-dd";
	
	/**
	 * 状态值为可用
	 */
	Integer status_ok = 1;
	
	/**
	 * 状态值无效
	 */
	Integer status_fail = 0;
	
	/**
	 * 获取相反状态
	 * @param status
	 * @return
	 */
	static int ConvertStatus(int status) {
		return status == Constant.status_ok ? Constant.status_fail :Constant.status_ok;
	}
}
